class ConfigModel(): #ConfigurationModel:
  
  def __init__(self, runID=None, userInput=None, userName=None):
    if runID != None and  userInput != None and userName != None:
      self.runID = runID
      self.userInput = userInput
      self.userName = userName

  def __unicode__(self):
    return "RunID: %s - %s" % (self.runID, self.userInput)

  def setCM(self, values):
    self.userInput = values
    
  def setRunID(self, runID):
    self.runID = runID
    
  def getCM(self):
    return self.userInput
    
  def loadCM(self, runID):
    return ConfigModel( runID,{
        'doctor':1,
        'nurse':1,
        'external_triage':1,
        'internal_triage':1,
        'external_clerk':1,
        'internal_clerk':1,
        'bed':1,
        'lab_tech':1,
        'ctscan_tech':1,
        'xray_tech':1,
        'ultrasound_tech':1,
        'rate':1,
        'runs':1,
        'hours':1,
        'acuity1':1,
        'acuity2':1,
        'acuity3':1,
        'acuity4':1,
        'acuity5':1,
        'acuity6':1,
        'walkin':1}, 'DummyUser')
    
  def setUserName(self, userName):
    self.userName = userName
    
  def createNewConfigModel(self):
    return ConfigModel()
    
  def submitCM(self):
    return "Sucessful save"
    
    #validation is redundant
"""  
  def validateCM(self, value=None):
    if value == None:
      errors = ""
      if self.userInput['doctors'] > 2: #validate all fields
        errors += 'Too many Doctors%n'         
      return errors
    else:
      if self.userInput[value] < 1:
        return '%s cannot be less than one' % value
 """